function orthbasis(t)

if nargin<1
    t=1;
end
ms{1}=@(s) 1/sqrt(t)+s-s;
ws{1}=@(s) s/sqrt(t);
ns{1}=@(s) 1/2*s.^2/sqrt(t);
for kk=2:100
    ms{kk}=@(s) sqrt(2/t)*cos((kk-1)*pi*s/t);
    ws{kk}=@(s) sqrt(2/t)*t/(kk-1)/pi*sin((kk-1)*pi*s/t);
    ns{kk}=@(s) sqrt(2*t)*t/(kk-1)^2/pi^2*(1-cos((kk-1)*pi*s/t));
end

fname='orthbase';
save(fname,'ms','ws','ns');

%
% for ii=1:10
%     for jj=1:10
%         disp(quadl(@(s)ms{ii}(s).*ms{jj}(s),0,1));
%     end
% end